
% If joh=true then we limit the cases to those where our method can be
% compared to the Johansen test.

joh=false

if joh
    
    cases={'simul2_1','simul2_2','simul2_3'}; % names of the DGPs
    rts={[0 0;0 0],[0 1;0 0],[1 1;0 0]};      % unit roots (first row 1, second row, -1)
    ord=[1 1 1];                              % order of the DGP

else
    cases={'simul2_1','simul2_2','simul2_3','simul2_4','simul2_5','simul2_6','simul2_7'};
    rts={[0 0;0 0],[0 1;0 0],[1 1;0 0],[0 2;0 0],[1 2;0 0],[2 2;0 0],[0 1;0 1]};
    ord=[1 1 1 2 2 2 2];
end

% Functions to control the dependence of the parameter of the approximate
% method on the length of the series.

e1fun=@(T) T.^(-1/3)
e2fun=@(T) T.^(-1/3)

M=500       % Number of simulations
n=2         % dimension
s=2         % seasonality parameter
T0=50      % first point of the series-length grid.
T1=250     % last point of the series-length grid.

% call to the function that runs along the grid

[pcmat, pcvmat, pcomat, pcjmat, Tgrid]=sequence_simul_nodiv2(M,T0,T1,e1fun,e2fun,n,s,cases,rts,ord,joh)

% generate graphs

graf_table